export const reEmail =
	/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;

export const _debounce = (fn: any, th: object, rDelay: number) => {
	let delay: number = rDelay || 600;
	let timer: any;
	return function () {
		let args = arguments;
		if (timer) {
			clearTimeout(timer);
		}
		timer = setTimeout(function () {
			timer = null;
			fn.apply(th as object, args as IArguments);
		}, delay);
	};
}
